package org.infodavid.common.model.components;

import org.infodavid.common.persistence.IBasicDataObject;

/**
 * The Interface IPhone.
 */
public interface IPhone extends IBasicDataObject {

  /**
   * The Enum EPhoneType.
   */
  enum EPhoneType {
    /** The PERSONAL_MOBILE. */
    PERSONAL_MOBILE,
    /** The PERSONAL_PHONE. */
    PERSONAL_PHONE,
    /** PERSONAL_FAX FAX. */
    PERSONAL_FAX,
    /** The OFFICE_MOBILE. */
    OFFICE_MOBILE,
    /** The OFFICE_PHONE. */
    OFFICE_PHONE,
    /** OFFICE_FAX FAX. */
    OFFICE_FAX,
    /** The UNDEFINED. */
    UNDEFINED
  }

  /** The TYPE. */
  String TYPE = "type";

  /** The VALUE. */
  String VALUE = "value";

  /** The PHONE. */
  String PHONE = "phone";

  /** The PATTERN. */
  String PATTERN = "^\\+?(\\(?[0-9 ]\\)?)+$";

  /** The constant MAX_LENGTH_PHONE. */
  int MAX_LENGTH_PHONE = 32;

  /**
   * Gets the type.
   * @return the type
   */
  EPhoneType getType();

  /**
   * Gets the value.
   * @return the value
   */
  String getValue();

  /**
   * Sets the type.
   * @param value the value
   */
  void setType(EPhoneType value);

  /**
   * Sets the value.
   * @param value the value
   */
  void setValue(String value);
}
